
<!--定义分页请求地址，传递给backConstant.ftl-->
<#assign urllist="${rc.contextPath}/computer/selectComputerTypeList" />
<!--定义详情请求地址，传递给backConstant.ftl-->
<#assign urldetail="${rc.contextPath}/computer/detailComputerType" />
<!--定义添加表单初始值请求地址，传递给backConstant.ftl-->
<#assign urladdforminit="${rc.contextPath}/computer/computerTypeFormInit" />
<!--定义保存实体变量地址，传递给backConstant.ftl-->
<#assign urlsave="${rc.contextPath}/computer/saveComputerType" />
<!--定义修改实体变量地址，传递给backConstant.ftl-->
<#assign urlupdate="${rc.contextPath}/computer/updateComputerType" />
<!--定义删除实体变量地址，传递给backConstant.ftl-->
<#assign urldelete="${rc.contextPath}/computer/deleteComputerType" />
<!--定义恢复实体变量地址，传递给backConstant.ftl-->
<#assign urlrenew="${rc.contextPath}/computer/renewComputerType" />
<#assign urlspecialtydata="${rc.contextPath}/computer/specialtyJsonData" />

<#include "/misc/backConstant.ftl">


<script type="text/javascript">


    var paginationColumns = [
    {field:"name",title:"<@i18n.message "computer.type.field.name"/>",width:50},
     {field:"createdate",title:"<@i18n.message "computer.type.message.field.createdate"/>",width:50}
    ];

		function doSearch${currentActionName}(){
			$('#' + dg).datagrid('load',{
				"nameSearchKey": $('#nameSearchKey${currentActionName}').val(),
		    });
		}
    		//可以在这里扩充详情的显示
		function detailSet${currentActionName}(result){
		}


</script>
<script type="text/javascript" src="${rc.contextPath}/static/js/crud.js"></script>
<div style="padding:5px;">
    <table id="dg${currentActionName}"></table>
    <div id="toolbar${currentActionName}"  style="padding:5px;height:auto">
        <div style="margin-bottom:5px">
            <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="openDetail('detail','${currentActionName}','${urldetail}')"><@i18n.message "button.detail"/></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="openAdd('dlg','fm','${currentActionName}','${urlsave}','${urladdforminit}')"><@i18n.message "button.add"/></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="openEdit('dlg','fm','${currentActionName}','${urlupdate}','${urldetail}')"><@i18n.message "button.edit"/></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="openDelete('${currentActionName}','${urldelete}')"><@i18n.message "button.delete"/></a>
            <a href="#" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onclick="openRenew('${currentActionName}','${urlrenew}')"><@i18n.message "button.renew"/></a>
        </div>
<!--        搜索-->
        <div>
            <input id="nameSearchKey${currentActionName}" class="easyui-textbox" data-options="prompt:'<@i18n.message "computer.type.field.name"/>'"> &nbsp;&nbsp;
             <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="doSearch${currentActionName}()"><@i18n.message "button.search"/></a>
        </div>
    </div>

    <div id="dlg${currentActionName}" class="easyui-dialog" closed="true" resizable="true" minimizable="true" collapsible="true" maximizable="true" style="width:35%;height:70%;padding:10px 20px"
         buttons="#dlg-buttons${currentActionName}">
        <div class="ftitle"><@i18n.message "computer.type.field.info"/></div>
        <@spring.form id="fm${currentActionName}" modelAttribute="vm" method="post">
        <div class="fitem">
            <label><@i18n.message "computer.type.field.name"/>:</label>
            <input name="name" id="nameFormKey${currentActionName}" class="easyui-textbox" data-options="required:true,validType:['length[2,50]']" missingMessage='<@i18n.message "computer.type.field.name"/>'>
        </div>
        <input type="hidden" name="${CoreConstants.TOKEN_KEY}" id="${CoreConstants.TOKEN_KEY}${currentActionName}">
    </@spring.form>
</div>

</div>
<div id="dlg-buttons${currentActionName}">
    <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="save('dlg','fm','${currentActionName}','${urlsave}','${urlupdate}')"><@i18n.message "button.save"/></a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancelForm('dlg','fm','${currentActionName}')"><@i18n.message "button.cancel"/></a>
</div>

<div id="detail${currentActionName}" class="easyui-dialog" closed="true" resizable="true" minimizable="true" collapsible="true" maximizable="true" style="width:35%;height:70%;padding:10px 20px" buttons="#detail-buttons${currentActionName}">
    <div class="ftitle"><@i18n.message "computer.type.field.info"/></div>
    <table class="window_table">
        <tr>
            <td><@i18n.message "computer.type.field.name"/>:</td>
            <td><label id="name${currentActionName}"></label></td>
        </tr>
        <tr>
            <td><@i18n.message "computer.type.message.field.createdate"/>:</td>
            <td><label id="createdate${currentActionName}"></label></td>
        </tr>
    </table>
</div>

<div id="detail-buttons${currentActionName}">
    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="cancelForm('detail',null,'${currentActionName}')"><@i18n.message "button.closed"/></a>
</div>
</div>